Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/service/src/commonMain/kotlin/org/meshtastic/core/service/LocalNetworkAccess.kt 4d4070c8e1ed73a56ee2f054300a0f62e3fe2e62 (4d4070c8) Text, 1.59 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.service

T8b949e/**
* Whether the platform currently permits opening a socket to a local-network address.
*
* Android 17 (API 37) gates local-network traffic behind `ACCESS_LOCAL_NETWORK`, and the gate is on the socket rather
* than on discovery: a blocked TCP connect does not fail fast, it *times out*. The service reconnects to a persisted
* device address at startup with no UI in sight, so without this check a TCP user who has not granted the permission
* simply waits out a socket timeout with nothing to explain it.
*
* A service has no `Activity`, so it cannot request the permission — it can only decline to try and say why. The
* request itself belongs to `ConnectionsScreen`.
*
* Implementations are per-platform and granted-by-construction everywhere the concept does not apply.
*/
Tff7b72fun Tff7b72interface T56d364LocalNetworkAccess Tb4b4b4{
Tff7b72fun Td2a8ffisGrantedTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s